Page({
  data: {
    list: []
  },
  onLoad(query) {
    this.getDetail(query.id)
    this.id = query.id
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.id,
    })
  },
  async getDetail(id) {
    const res = await wx.http.get(`/room/${id}`)
    // console.log(res);
      this.setData({ list: res.data })
  }
})
